package com.example.text.mapper;



import com.example.text.entity.Inware;
import com.example.text.entity.Ware;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface InWareMapper{


    @Select("select * from inware where delete_flag=1")
    List<Inware> selectAllOrder();
    @Select("select * from inware where delete_flag=1 and Inware_order=#{InWareOrder}")
    Inware selectByOrder(String inWareOrder);

    @Update("update inware set delete_flag=0 where Inware_id=#{InWareId}")
    void deleteOrder(Integer InWareId);

    @Insert("insert into inware(inware_id, inware_date, inware_ton, inware_num, inware_order, car_id,ware_id) " +
            "values(#{InWareId}, #{InWareDate}, #{InWareTon}, #{InWareNum}, #{InWareOrder}, #{CarId},#{WareId})")
    void insert(Inware inware);


}
